﻿
using Bentley.GeometryNET;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 圆管涵正管节;

namespace 平交口设计
{

    public class CheccWingWallData
    {
        private static volatile CheccWingWallData instance = null;
        private static object lockHelper = new object();
        public string solidName = "圆管涵";

        //总体 
        public double slope_subgrade = 1.5;                                       //路基边坡坡度(1:n) //路基边坡坡度(1:n)   自己获取
        public double A_L = 45;                                                   //涵洞轴线与左洞路基边缘线夹角(路线前进方向右旋夹角)    ?
        public double A_R = 45;                                                   //涵洞轴线与右洞路基边缘线夹角(路线前进方向右旋夹角)?
         
        //铺砌
        public double paveSlope_L = 0.01;                                         //左洞洞口铺砌坡度:向外方向下坡为负, 坡度值为沿着涵洞轴线方向?
        public double paveSlope_R = -0.03;                                        //右洞洞口铺砌坡度:向外方向下坡为负, 坡度值为沿着涵洞轴线方向?
        public double thickness_pave = 0.4;                                       //铺砌厚度(m)   界面
        public double paveOffset_L = 2;                                           //左洞铺砌外延(m) 界面没有
        public double paveOffset_R = 2;                                           //左洞铺砌外延(m) 界面没有
        public double paveZ_L = 0.3;                                              //左洞洞口铺砌基点高程(高于八字墙底面的高度)
        public double paveZ_R = 0.3;                                              //右洞洞口铺砌基点高程(高于八字墙底面的高度)

        //截水墙
        public double H_CutoffWall = 0.8;                                         //截水墙高（不含铺砌高度）(m) 界面有
        public double W_CutoffWall = 0.4;                                         //截水墙厚(m)  界面没有

        //两侧八字墙净距
        public double distance_L = 6;                                             //左洞两侧八字墙最高截面处沿桩号的净距 界面没有
        public double distance_R = 6;                                             //右洞两侧八字墙最高截面处沿桩号的净距 界面没有

        //八字墙内侧底部边缘线与道路法线的夹角(°) 
        public double angle_Lmin = 30;                                            //左洞小桩号
        public double angle_Lmax = 30;                                            //左洞大桩号
        public double angle_Rmin = 30;                                            //右洞小桩号
        public double angle_Rmax = 30;                                            //右洞大桩号

        //八字墙构造参数
        public double W_topWall = 0.55;                                           //八字墙顶宽a(m)  界面:翼墙顶垂直宽
        public double H_min = 1.05;                                               //八字墙最低截面高度h(m) 界面有
        public double H_max = 6;                                                  //八字墙最高截面高度h(m)  界面没有

        //八字墙基础
        public double W_innerEdge = 0.5;                                          //基础内侧襟边e1(m)  界面有
        public double W_outerEdge = 0.2;                                          //基础外侧襟边e2(m)  界面有
        public double slope_outerVerticalWall = 3.5;                              //翼墙垂直背坡(n:1)  界面有
        public double foundationThickness = 0.6;                                  //翼墙基础厚度d(m)   界面有

        //模型名
        public string ModelName = "洞口";

        //八字墙图层 样色
        public string LevelName = "八字墙";
        public SolidColor solidColor=SolidColor.紫色;
        public SolidLineStyle solidLineStyle=SolidLineStyle.连续线;

        //铺砌图层 样色
        public string paveLevelName = "铺砌";
        public SolidColor paveSolidColor = SolidColor.红色;
        public SolidLineStyle paveSolidLineStyle = SolidLineStyle.连续线;

        //八字墙基础图层 样色
        public string baseLevelName = "八字墙基础";
        public SolidColor baseSolidColor = SolidColor.绿色;
        public SolidLineStyle baseSolidLineStyle = SolidLineStyle.连续线;

        //截水墙图层 样色
        public string cutoffWallLevelName = "截水墙";
        public SolidColor cutoffWallSolidColor = SolidColor.莹黄;
        public SolidLineStyle cutoffWallSolidLineStyle = SolidLineStyle.连续线;

        //重要数据写入dataBlock
        public ushort steelDataBlockID { get; } = 20211;                          //数据写入八字墙元素, ID号保持不变
        /*写入dataBlock数据格式举例:

         */
        public static CheccWingWallData Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (lockHelper)
                    {
                        if (instance == null)
                        {
                            instance = new CheccWingWallData();
                        }
                    }
                }
                return instance;
            }
        }
    }
}
